package com.mmall.order.api.dto;

import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author hejianglong
 * @date 2019/10/25
 */
@Data
@Accessors(chain = true)
public class OrderItemDTO implements Serializable {

    private final long serialVersionUID = 1L;

    @NotNull(message = "请选择商品后购买")
    private Long productId;

    @Min(value = 1, message = "购买数量不能为 0")
    private Integer quantity;

    private String remark;
}
